class Hdd < ActiveRecord::Base
  attr_accessible :description, :price, :title, :product_url, :capacity, :connector, :hddtype, :speed, :transfer
  acts_as_heir_of :product

  validates :description, :price, :title, :product_url, :capacity, :connector, :hddtype, :speed, :transfer, presence: true
  #validates :title, uniqueness: true  ---> En la clase padre
  validates :price, numericality: {greater_than_or_equal_to: 0.01}
  validates :capacity, numericality: {greater_than_or_equal_to: 256}
  validates :speed, numericality: {greater_than_or_equal_to: 3600}
  validates :transfer, numericality: {greater_than_or_equal_to: 1}
end
